package com.ftf.tp.blog.infrastructure.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ftf.tp.blog.infrastructure.mapper.pos.ArticleDataPO;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

/**
 *
 * @author tanghao
 * @date 2022/6/24
 */
public interface ArticleDataMapper extends BaseMapper<ArticleDataPO> {
    int updateBatch(List<ArticleDataPO> list);

    int batchInsert(@Param("list") List<ArticleDataPO> list);
    int updateBatchByBlogId(List<ArticleDataPO> list);

    /**
     * 更改文章的点赞数
     */
    void updateSupportCount(Long blogId, Integer sum);

    List<Long> getHotRank();

    Long getBlogHot(Long blogId);

    Long getBlogLookAmount(Long blogId);

    List<Map<String, Long>> getSupportByIdList(List<Long> emptyList);

    List<Map<String, Long>> getHotValueByIdList(List<Long> emptyList);
}